home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
AMIGA
/
(A)G
/
(A)G6.ADF
/
arthur
< prev
next >
Wrap
Text File
|
1988-05-24
|
2KB
|
81 lines
drive wheel 100 \ give it a wheel drive with 100 extra armor \
cpu 32bit \ make it think well. \
reg 5 \ only need a few storage registers. \
weapon laser 30 70 \ give it a laser with 30 armor and 100 shots \
weapon hgun 30 70 \ and a lgun with 30 armor and 70 shots \
\ note since the laser was defined first, it \
\ is weapon 0, and the lgun is 1 \
equate width 0 \ everywhere "width" is seen, it is replaced \
\ with "0" \
equate angle 1
equate dist 2
equate run 3
label start \ where to come back to when starting again \
# 0 speed \ make sure it's not going anywhere \
# 50, posy, -, enter, # 50, posx, -, atan2, # 90, -, sto run
\ direction to go when running away. \
# 90
sto width \ reg 0 holds beam width \
sto angle \ reg 1 holds angle looking at \
label scan
hit \ see if it gets hit while looking \
x!=0? \ if it does, move \
goto move
rcl width \ recall the beam width \
rcl angle \ recall the scan angle \
radar \ anyone out there? \
x>0? \ found something \
sto dist \ store distance \
x>0?
goto sam
rcl width
# 2 *
sto+ angle \ add it \
label sam \ found something \
# 2
sto/ width \ half the beam width \
rcl width
sto- angle \ take new width from scan angle \
# .6
x<y? \ if width is less than .6, start firing. \
goto scan
# 2, rcl dist, /, atan \ shoot to the left a bit \
rcl angle, +, aim
label fire
hit
x!=0?
goto move
rcl dist
fire 0 \ fire the laser \
fire 1 \ fire the gun \
# .8 \ beam width is put in x \
rcl angle \ rcl pushes stack up, so beam width is now in y,\
\ and recalled number is in x \
radar \ is it still there ? \
x<0? goto start \ find it again if arthur lost it \
sto dist \ save its distance in case it moved \
goto fire \ otherwise keep firing \
label move
# 20 \ run away!!! \
speed
rcl run
heading
# 20
sto+ run \ change direction to run each time \
# 50 delay \ a delay \
# 0 speed \ and stop \
goto start \ find something to shoot \